<template>
  <div>
    <div class="list-item" v-for="(item,i) in list" @click="toDetail(item)" :key="i">
      <img class="list-img" :src="item.pictureUrl" alt="">
      <div class="list-right">
        <p class="list-title">{{item.newsTitle}}</p>
        <p class="list-cont">{{item.newsDescribe}}</p>
        <p class="list-time">发布时间：{{item.createTime}}</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default: () => []
      }
    },
    data() {
      return {

      }
    },
    methods: {
      toDetail(item) {
        this.$emit("clickparent", item)
      }
    }
  }
</script>

<style scoped="scoped">
  .list-item {
    display: flex;
    width: 1200px;
    height: 227px;
    padding: 20px 0;
    border-bottom: solid 1px #E4E4E4;
    box-sizing: border-box;
    cursor: pointer;
  }

  .list-img {
    width: 250px;
    height: 187px;
    margin-right: 40px;
  }

  .list-cont {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 24px;
    color: #666666;
    margin-top: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .list-title {
    font-size: 20px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 24px;
    color: #106470;
    display: flex;
    align-items: center;
  }

  .list-time {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 24px;
    color: #999999;
    margin-top: 15px;
  }

  .ending {
    display: block;
    width: 56px;
    height: 24px;
    background: #E9E9E9;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 24px;
    color: #999999;
    text-align: center;
    margin-left: 15px;
  }

  .list-right {
    position: relative;
  }

  .apply {
    width: 118px;
    height: 32px;
    background: #000000;
    border: none;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 32px;
    color: #FFFFFF;
    position: absolute;
    bottom: 0;
  }

  .check-more {
    width: 118px;
    height: 32px;
    background: #000000;
    border: none;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 32px;
    color: #FFFFFF;
    margin-top: 30px;
  }

  .arrow-right {
    width: 6px;
    height: 11px;
    margin-left: 12px;
  }
</style>
